package org.bluedream.core.module.entity.fixed;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.bluedream.comm.base.OrgPageEntity;
import org.bluedream.core.module.entity.depItem.DepItem;
import org.bluedream.core.module.entity.goods.Goods;
import org.bluedream.core.module.entity.warehouse.WareHouse;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @ClassName Fixed
 * @Description TODO
 * @Author Administrator
 * @Data 2021/11/29 16:12
 * @Version
 */
@Data
@ToString(callSuper = true)
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@TableName(value = "tFixed")
public class Fixed extends OrgPageEntity<Fixed> {
    private static final long serialVersionUID = -757981673424873060L;
    //存放地点类型：0：部门;1:仓库
    private String locationType;
    //存放地点id
    private String skuLocation;
    @TableField(exist = false)
    private String skuLocationName;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date checkDate;
    private String checkBy;
    private String cardNum;
    private String code;
    private String barcode;
    private BigDecimal oprice;
    @TableField(exist = false)
    private Goods goods;
    @TableField(exist = false)
    private WareHouse wareHouse;
    @TableField(exist = false)
    protected String  geCreateDate;
    @TableField(exist = false)
    protected String  ltCreateDate;
    @TableField(exist = false)
    protected String  geCheckDate;
    @TableField(exist = false)
    protected String  ltCheckDate;
    @TableField(exist = false)
    private DepItem depItem;
    private String depCode;
    @TableField(exist = false)
    private String depName;
    private String userCode;
    @TableField(exist = false)
    private String userName;
    private String name;
    private String unit;
    private String spec;
    private Integer qty;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date buyDate;
    private Integer useLife;
    private Double rate;
    private BigDecimal zhejiu;
    private BigDecimal total;

    public Fixed(String id) {
        super(id);
    }

    public Fixed(long limit , long pageSize) {
        super(limit , pageSize);
    }
}